//
//  AdDetail.m
//  DaoZiJinFu
//
//  Created by woker on 16/7/18.
//  Copyright © 2016年 iwoker. All rights reserved.
//

#import "AdDetail.h"

@interface AdDetail ()<UIWebViewDelegate>

@end

@implementation AdDetail

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = BACKGROUND_COLOR;
    [self leftButton:nil];
    UIWebView *web = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)];
    [self.view addSubview:web];
    web.backgroundColor = [UIColor whiteColor];
    web.delegate = self;
    _urlStr = [NSString stringWithFormat:@"%@?source_id=%@&sid=%@&mobile=%@",
               _urlStr,@"4",userValue(SID)?:@""
               ,DZUserInfo.userInfo.mobile?:@""];
    [web loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:_urlStr]]];
    [JDHudUtil showToView:self.view];
}

- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error {
    [JDHudUtil HideToView:self.view];
    JSSHOW(LOAD_FAIL_TIP);
}

- (void)webViewDidFinishLoad:(UIWebView *)webView {
    [JDHudUtil HideToView:self.view];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];

}

@end
